const http = require("http");
const fs = require("fs");

const serverOne = http.createServer((req, res) => {
  res.writeHead(200, { "Content-Type": "text/html" });
  fs.createReadStream(`${__dirname}/serverOne/index.html`, "utf8").pipe(res);
});

serverOne.listen(3000, "127.0.0.1");
console.log("Server running at http://127.0.0.1:3000/");

const serverTwo = http.createServer((req, res) => {
  res.writeHead(200, { "Content-Type": "text/html" });
  fs.createReadStream(`${__dirname}/serverTwo/index.html`, "utf8").pipe(res);
});

serverTwo.listen(3400, "127.0.0.1");
console.log("Server running at http://127.0.0.1:3400/");
